\chapter[Public Attributes]{Public Attributes}

\section{Public Attributes}

There are some public attributes inside the \GRID. 
These attributes may be read or set at any time inside your JS code and they'll influence the 
behaviour \GRID will have on future actions.\\
Those attributes are:

\bl
	\titem{current_style (read/write) - string}{
		Use this attribute to set row style to be used while adding \I{new} rows.
		After this attribute is set, every row added to the \GRID
		will use this style until a new style is defined by setting the \texttt{current_style} 
		attribute to a new value.\\
		The \texttt{current_style} attribute can assume one of the following defaults:
		%\bl
			%\titem{normal}{The default style. Defines a "normal" row.}
			%\titem{error}{This style should be used to show the user very critical rows.}
			%\titem{warn}{This style should be used to show the user important rows.}
			%\titem{note}{This style should be used to highlight to the user some rows.}
		%\el
	}

	\titem{height (read/write) - string}{
		Use this method to set the \GRID height. If you want the browser to set one of the
		sizes for you, pass \texttt{0} as value. Both \texttt{width} and \texttt{height} follow
		the \CSS syntax, so you can specify, for example \texttt{220px} or \texttt{80\%}.
	}

	\titem{highlight (read/write) - boolean}{
		By using this attribute you can enable or disable \textit{row highlighting}, a special visual
		effect that will highlight the row currently under the mouse. This is extremely useful
		for the users so they can see all row data in a glimpse.
	}

	\titem{id (read only) - string}{
		This is the internal "id" name of the \GRID. You should \textit{never} change this attribute, 
		or the script may quit working.
	}

	\titem{resize\_cols (read/write) - boolean}{
		Sometimes you would like the user to be able to resize \GRID columns. To do so, simply set this attribute
		to \texttt{true}. From the next \texttt{render()}, the user will be able to resize \GRID columns by simply placing
		the mouse pointer between two columns and dragging the pointer left or right while pressing the left mouse button.

		\NOTE{  Remember that this feature will start to work \textbf{after} the next \texttt{render()} call.}
	}

	\titem{sortable (read/write) - boolean}{
		If you want the grid to behave like a real spreadsheed grid, you may wish the user to be able
		to sort rows by clicking on \GRID title columns. By setting this flag to \texttt{true}
		(and eventually calling the \texttt{render()} method) you can achieve this goal.
	}

	\titem{start\_counter (read/write) - integer}{
		If you have set the \texttt{show\_row\_num()} to \texttt{true}, the \GRID will show row numbers as the first column of each row.
		By default, row numbers start from zero, but if you want, by setting the \texttt{start\_counter} attribute, you can define
		the first value of the \GRID row numbers.

		\NOTE{  Remember that this feature will start to work \textbf{after} the next \texttt{render()} call.}
	}

	\titem{width (read/write) - string}{
		Use this method to set the \GRID width. If you want the browser to set one of the
		sizes for you, pass \texttt{0} as value. Both \texttt{width} and \texttt{height} follow
		the \CSS syntax, so you can specify, for example \texttt{220px} or \texttt{80\%}.
	}
\el
